<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
    document.write('<script src="resources/non-existant.js"></scr'+'ipt>');
    document.write('<noscript>');
    document.write('<img src="resources/noscript-image1.png">');
    document.write('</noscript>');
</script>
<script>
    document.write('<noscript>');
</script>
</noscript>
<script>
    document.write('<script src="resources/non-existant.js"></scr'+'ipt>');
    document.write('<img src="resources/noscript-image2.png">');
</script>
<script>
test(function() {
    if (window.internals === undefined) {
        throw new Error("The test requires internals.isPreloaded function.");
    }

    assert_false(internals.isPreloaded("resources/noscript-image1.png"));
    assert_true(internals.isPreloaded("resources/noscript-image2.png"));
}, "Don't preload resources inside noscript block");
</script>
